
// 默认是0开始，也可以自行更改值 LEFT = 100
enum Direction {
    LEFT = 100, // 100
    RIGHT, // 101
    TOP, // 102
    BOTTOM  // 103
}

function turnDirection(direction: Direction) {
    switch (direction) {
        case Direction.LEFT:
            console.log('Direction左')
        break;
        case Direction.RIGHT:
            console.log('Direction右')
        break;
        case Direction.TOP:
            console.log('Direction上')
        break;
        case Direction.BOTTOM:
            console.log('Direction下')
        break;
        
    }
}

turnDirection(Direction.LEFT)
turnDirection(Direction.RIGHT)
turnDirection(Direction.TOP)
turnDirection(Direction.BOTTOM)
console.log(Direction.LEFT)
console.log(Direction.RIGHT)
console.log(Direction.TOP)
console.log(Direction.BOTTOM)
